package com.hxm.meizi.listener;

import android.view.View;
import android.widget.FrameLayout;
import android.widget.ImageView;

import com.hxm.meizi.http.JsoupDoc;

import me.drakeet.multitype.Items;

/**
 * Created by Hxm on 2017/2/23.
 * 数据加载监听
 */

public class ItemsRequestListener implements JsoupDoc.ItemsLoadListener {
    private ImageView progressBar;
    private FrameLayout layout;

    public ItemsRequestListener(ImageView progressBar) {
        this.progressBar = progressBar;
    }

    @Override
    public void onStart() {
        progressBar.setVisibility(View.VISIBLE);
    }

    @Override
    public void onSuccess(Items items) {
        progressBar.setVisibility(View.GONE);
    }

    @Override
    public void onFailure(String reason) {
        progressBar.setVisibility(View.GONE);
    }
}
